<div id="pan"><?php echo $html->link(__('Home',true), '/'); ?> &gt; <strong><?php __('Register');?></strong></div>

<h2><?php __('User Registration');?></h2>
<h3><?php __('Notice');?></h3>
<div class="post">
	<p><?php echo __('Please user registration to post a MML and comment or vote for post in this site.',true); ?><br />
	<?php echo __('The user name here is used to the last only at the time of login.',true); ?><br />
	<?php echo __('A display name (player name) etc. can be changed from a profile screen.',true); ?></p>
</div>

<h3><?php __('Register');?></h3>
<?php echo $form->create('User',array('action'=>'register', 'dojoType'=>'dijit.form.Form'));?>
<dl>
	<dt><?php echo __('Username'); ?></dt>
	<dd><?php
		echo $form->text('username',array(
			'maxlength'=>'12',
			'dojoType'=>'dijit.form.ValidationTextBox',
			'RegExp'=>'[ -~]{4,12}',
			'required'=>'true',
			'style'=>'width:144px;ime-mode:disabled;',
			'invalidMessage'=>sprintf(__('Please enter the %s less than between %d and %d alphanumeric characters.',true),__('Username',true),'4','12'),
			'onfocus'=>'this.imeMode=\'disabled\';'
		));
		echo $form->error('User.username',sprintf(__('Please enter the %s less than between %d and %d alphanumeric characters.',true),__('Username',true),'4','12'));
		echo $form->error('User.username_unique', sprintf(__('This %s is already registered. ',true),__('Username',true)) . $html->link(__('Forgot your password?',true), '/users/reminder'));
	?></dd>
	<dt><?php echo __('Mail Address'); ?></dt>
	<dd><?php
		echo $form->text('email',array(
			'maxlength'=>'40',
			'style'=>'width:200px;ime-mode:disabled;',
			'dojoType'=>'dijit.form.ValidationTextBox',
			'RegExp'=>"^[a-zA-Z0-9!$&*.=^`|~#%'+\/?_{}-]+@([a-zA-Z0-9_-]+\.)+[a-zA-Z]{2,4}$",
			'required'=>'true',
			'invalidMessage'=>__('Please enter the valid mail address.',true),
			'onfocus'=>'this.imeMode=\'disabled\';'
		));
		echo $form->error('User.email',__('You must enter the valid mail address.',true));
	?></dd>
	<dt><?php echo __('Password'); ?></dt>
	<dd>
		<!--div dojoType="dojox.form.PasswordValidator" name="data[User][password]">
			<input type="password" pwType="new" /><br />
			<input type="password" pwType="verify" /><?php echo __('(Confirm)',true); ?>
		</div -->
		<?php
				echo $form->password('User.password',array(
					'maxlength'=>'12',
					'style'=>'width:96px;',
					'dojoType'=>'dijit.form.ValidationTextBox',
					'RegExp'=>'^[ -~]{4,12}$',
					'required'=>'true',
					'invalidMessage'=>sprintf(__('Please enter the %s less than between %d and %d alphanumeric characters.',true),__('Password',true),'4','12'),
					'pwType'=>'new',
					'onfocus'=>'this.imeMode=\'disabled\';'
				));
				echo $form->error('password', sprintf(__('Please enter the %s less than between %d and %d alphanumeric characters.',true),__('Password',true),'4','12'));
			?>
	</dd>
</dl>
<p class="action">
	<button dojoType="dijit.form.Button" type="submit"><?php echo $html->image('icons/16x16/add_user.png', array('alt'=>__('Create Account', true), 'border'=>"0")).'&nbsp;'.__('Create Account',true) ?></button>
	<button type="reset" dojoType="dijit.form.Button"><?php echo $html->image('icons/16x16/reload.png', array('alt'=>__('Reset', true), 'border'=>"0")).'&nbsp;'.__('Reset',true) ?></button>&nbsp;
	<button id="cancel" dojoType="dijit.form.Button" onclick="cancel();"><?php echo $html->image('icons/16x16/cancel.png', array('alt'=>__('Cancel', true), 'border'=>"0")).'&nbsp;'.__('Cancel',true) ?></button>
</p>
<?php echo $form->end();?>

<?php $this->addScript($javascript->codeBlock('
dojo.require("dojo.parser");
dojo.require("dijit.form.Button");
dojo.require("dijit.form.Form");
dojo.require("dijit.form.ValidationTextBox");
//dojo.require("dojox.form.PasswordValidator");
function cancel(){ location.href = history.back(); }
',array('inline' => false))); 
$head->meta(array('name'=>'robots','content'=>'noindex,nofollow'));
?>
